<include file="public@header" />
</head>
<body>
<div class="wrap js-check-wrap">
    <ul class="nav nav-tabs">
        <li class="active"><a href="{:url('student/index')}">所有学生</a></li>
        <li><a href="{:url('student/add')}">添加学生</a></li>
    </ul>
    <form class="well form-inline margin-top-20" method="get" action="{:url('student/index')}">
        学校名称:
        <select name="school_id" id="selectSchool" class="form-control">
            <option value="0">请选择学校</option>
            <volist name="school" id="vo">
                <php>$selectSchool = $vo['id'] == $school_id ? "selected" : " "</php>
                <option value="{$vo.id}" {$selectSchool}>{$vo.name}</option>
            </volist>
        </select>
        班级名称：
        <select name="class_id" class="form-control" id="class">
            <option value="">请选择班级</option>
            <volist name='class' id="vo">
                <php>$class = $vo['id'] == $class_id ? "selected" : " "</php>
                <option value="{$vo.id}" {$class}>{$vo.name}</option>
            </volist>
        </select>
        学生姓名:
        <input type="text" class="form-control" name="name" style="width: 120px;" value="{$Request.param.name}" placeholder="请输入学生名称">
        <input type="submit" class="btn btn-primary" value="搜索" />
        <a class="btn btn-danger" href="{:url('student/index')}">清空</a>
    </form>
    <form method="post" class="js-ajax-form margin-top-20" action="{:url('student/listOrder')}">
        <div class="table-actions">
            <button class="btn btn-sm btn-danger js-ajax-submit" type="submit"
                    data-action="{:url('student/toggle',array('hide'=>1))}" data-subcheck="true">批量删除
            </button>
        </div>
    </form>
    <table class="table table-hover table-bordered">
        <thead>
        <tr>
            <th><label><input type="checkbox" class="js-check-all" data-direction="x"
                              data-checklist="js-check-x"></label></th>
            <th width="50">ID</th>

            <th>头像</th>
            <th>姓名</th>
            <th>性别</th>
            <th>年龄</th>
            <th>手机号</th>
            <th>身份证号</th>
            <th>所在班级</th>
            <th>所在学校</th>
            <th>修改时间</th>
            <th>创建时间</th>
            <th width="140">{:lang('ACTIONS')}</th>
        </tr>
        </thead>
        <tbody>
        <foreach name="student" item="vo">
            <tr>
                <td><input type="checkbox" class="js-check" data-yid="js-check-y" data-xid="js-check-x" name="ids[]"
                           value="{$vo.id}"></td>
                <td>{$vo.id}</td>
                <td>{$vo.image}</td>
                <td>{$vo.name}</td>
                <eq name = "$vo.sex" value="1">
                    <td>男</td>
                <else>
                    <td>女</td>
                </else>
                </eq>
                <td>{$vo.year}</td>
                <td>{$vo.mobile}</td>
                <td>{$vo.identity}</td>
                <td>{$vo.class_name}</td>
                <td>{$vo.school_name}</td>
                <td>{$vo.update_time}</td>
                <td>{$vo.create_time}</td>
                <td>
                    <a class="btn btn-xs btn-primary" href='{:url("student/edit",array("id"=>$vo["id"]))}'>{:lang('EDIT')}</a>
                    <a class="btn btn-xs btn-danger js-ajax-delete" href="{:url('student/delete',array('id'=>$vo['id']))}">{:lang('DELETE')}</a>
                </td>

            </tr>

        </foreach>
        </tbody>
    </table>
    <div class="pagination">{$page}</div>
</div>
<script src="__STATIC__/js/admin.js">
</script>
</body>
</html>